package com.dragon.modules.yuegou.query.lot;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.dragon.modules.yuegou.entity.lot.MemberTicketEntity;
import com.dragon.modules.yuegou.enums.lot.MemberTicketGetType;
import com.dragon.modules.yuegou.mybatis.Condition;
import com.dragon.modules.yuegou.mybatis.Query;
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonInclude.Include;
import com.fasterxml.jackson.annotation.JsonUnwrapped;

import java.time.LocalDateTime;

/**
 * 会员奖券信息表 动态查询条件
 * 
 * @author pbuilder generated
 * @date 2019-10-24 10:22:55
 * @version 2.0
 */
@JsonInclude(Include.NON_NULL)
public class MemberTicketQuery extends MemberTicketEntity implements Query<MemberTicketEntity> {


    /** 查询条件 */
	@JsonUnwrapped(prefix = "id")
	private Condition<String> idCondition;

    /** 会员ID查询条件 */
	@JsonUnwrapped(prefix = "memberId")
	private Condition<String> memberIdCondition;

    /** 活动ID查询条件 */
	@JsonUnwrapped(prefix = "activityId")
	private Condition<String> activityIdCondition;

    /** 当前会员参与ID查询条件 */
	@JsonUnwrapped(prefix = "joinId")
	private Condition<String> joinIdCondition;

    /** 分享着参与ID查询条件 */
	@JsonUnwrapped(prefix = "shareId")
	private Condition<String> shareIdCondition;

    /** 券码查询条件 */
	@JsonUnwrapped(prefix = "ticketCode")
	private Condition<String> ticketCodeCondition;

    /** 是否中奖 0-未中奖；1-已中奖查询条件 */
	@JsonUnwrapped(prefix = "isPrize")
	private Condition<Boolean> isPrizeCondition;

    /** [枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件 */
	@JsonUnwrapped(prefix = "getType")
	private Condition<MemberTicketGetType> getTypeCondition;

    /** 创建人ID查询条件 */
	@JsonUnwrapped(prefix = "createdBy")
	private Condition<String> createdByCondition;

    /** 创建时间查询条件 */
	@JsonUnwrapped(prefix = "createdTime")
	private Condition<LocalDateTime> createdTimeCondition;

    /** 更新人ID查询条件 */
	@JsonUnwrapped(prefix = "modifiedBy")
	private Condition<String> modifiedByCondition;

    /** 更新时间查询条件 */
	@JsonUnwrapped(prefix = "modifiedTime")
	private Condition<LocalDateTime> modifiedTimeCondition;

	/**
	 * 构造一个查询条件对象
	 */
	public MemberTicketQuery() {
		super();
	}

	/**
	 * 依据实体对象构造一个查询条件对象
	 * 
	 * @param entity 实体对象
	 */
	public MemberTicketQuery(MemberTicketEntity entity) {
		super(entity);
	}

	/**
	 * 依据其它查询条件对象的信息构造一个查询条件对象
	 * 
	 * @param other 查询条件对象
	 */
	public MemberTicketQuery(MemberTicketQuery other) {
		super(other);
		if(other.idCondition != null) {
			this.idCondition = other.idCondition.copy();
		}
		if(other.memberIdCondition != null) {
			this.memberIdCondition = other.memberIdCondition.copy();
		}
		if(other.activityIdCondition != null) {
			this.activityIdCondition = other.activityIdCondition.copy();
		}
		if(other.joinIdCondition != null) {
			this.joinIdCondition = other.joinIdCondition.copy();
		}
		if(other.shareIdCondition != null) {
			this.shareIdCondition = other.shareIdCondition.copy();
		}
		if(other.ticketCodeCondition != null) {
			this.ticketCodeCondition = other.ticketCodeCondition.copy();
		}
		if(other.isPrizeCondition != null) {
			this.isPrizeCondition = other.isPrizeCondition.copy();
		}
		if(other.getTypeCondition != null) {
			this.getTypeCondition = other.getTypeCondition.copy();
		}
		if(other.createdByCondition != null) {
			this.createdByCondition = other.createdByCondition.copy();
		}
		if(other.createdTimeCondition != null) {
			this.createdTimeCondition = other.createdTimeCondition.copy();
		}
		if(other.modifiedByCondition != null) {
			this.modifiedByCondition = other.modifiedByCondition.copy();
		}
		if(other.modifiedTimeCondition != null) {
			this.modifiedTimeCondition = other.modifiedTimeCondition.copy();
		}
	}

	@Override
	public QueryWrapper<MemberTicketEntity> toQueryWrapper() {
		QueryWrapper<MemberTicketEntity> wrapper = new QueryWrapper<>(this);
		if (idCondition != null) {
			idCondition.toWrapper(wrapper, COL_ID);
		}
		if (memberIdCondition != null) {
			memberIdCondition.toWrapper(wrapper, COL_MEMBER_ID);
		}
		if (activityIdCondition != null) {
			activityIdCondition.toWrapper(wrapper, COL_ACTIVITY_ID);
		}
		if (joinIdCondition != null) {
			joinIdCondition.toWrapper(wrapper, COL_JOIN_ID);
		}
		if (shareIdCondition != null) {
			shareIdCondition.toWrapper(wrapper, COL_SHARE_ID);
		}
		if (ticketCodeCondition != null) {
			ticketCodeCondition.toWrapper(wrapper, COL_TICKET_CODE);
		}
		if (isPrizeCondition != null) {
			isPrizeCondition.toWrapper(wrapper, COL_IS_PRIZE);
		}
		if (getTypeCondition != null) {
			getTypeCondition.toWrapper(wrapper, COL_GET_TYPE);
		}
		if (createdByCondition != null) {
			createdByCondition.toWrapper(wrapper, COL_CREATED_BY);
		}
		if (createdTimeCondition != null) {
			createdTimeCondition.toWrapper(wrapper, COL_CREATED_TIME);
		}
		if (modifiedByCondition != null) {
			modifiedByCondition.toWrapper(wrapper, COL_MODIFIED_BY);
		}
		if (modifiedTimeCondition != null) {
			modifiedTimeCondition.toWrapper(wrapper, COL_MODIFIED_TIME);
		}
		return wrapper;
	}

	/**
	 * 构造并返回查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> id() {
		this.idCondition = new Condition<>();
		return this.idCondition;
	}
	
	/**
	 * 获取查询条件
	 * 
	 * @return idCondition 查询条件
	 */
	public Condition<String> getIdCondition() {
		return idCondition;
	}

	/**
	 * 设置查询条件
	 * 
	 * @param idCondition 查询条件
	 */
	public void setIdCondition(Condition<String> idCondition) {
		this.idCondition = idCondition;
	}

	/**
	 * 构造并返回会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> memberId() {
		this.memberIdCondition = new Condition<>();
		return this.memberIdCondition;
	}
	
	/**
	 * 获取会员ID查询条件
	 * 
	 * @return memberIdCondition 会员ID查询条件
	 */
	public Condition<String> getMemberIdCondition() {
		return memberIdCondition;
	}

	/**
	 * 设置会员ID查询条件
	 * 
	 * @param memberIdCondition 会员ID查询条件
	 */
	public void setMemberIdCondition(Condition<String> memberIdCondition) {
		this.memberIdCondition = memberIdCondition;
	}

	/**
	 * 构造并返回活动ID查询条件
	 * 
	 * @return activityIdCondition 活动ID查询条件
	 */
	public Condition<String> activityId() {
		this.activityIdCondition = new Condition<>();
		return this.activityIdCondition;
	}
	
	/**
	 * 获取活动ID查询条件
	 * 
	 * @return activityIdCondition 活动ID查询条件
	 */
	public Condition<String> getActivityIdCondition() {
		return activityIdCondition;
	}

	/**
	 * 设置活动ID查询条件
	 * 
	 * @param activityIdCondition 活动ID查询条件
	 */
	public void setActivityIdCondition(Condition<String> activityIdCondition) {
		this.activityIdCondition = activityIdCondition;
	}

	/**
	 * 构造并返回当前会员参与ID查询条件
	 * 
	 * @return joinIdCondition 当前会员参与ID查询条件
	 */
	public Condition<String> joinId() {
		this.joinIdCondition = new Condition<>();
		return this.joinIdCondition;
	}
	
	/**
	 * 获取当前会员参与ID查询条件
	 * 
	 * @return joinIdCondition 当前会员参与ID查询条件
	 */
	public Condition<String> getJoinIdCondition() {
		return joinIdCondition;
	}

	/**
	 * 设置当前会员参与ID查询条件
	 * 
	 * @param joinIdCondition 当前会员参与ID查询条件
	 */
	public void setJoinIdCondition(Condition<String> joinIdCondition) {
		this.joinIdCondition = joinIdCondition;
	}

	/**
	 * 构造并返回分享着参与ID查询条件
	 * 
	 * @return shareIdCondition 分享着参与ID查询条件
	 */
	public Condition<String> shareId() {
		this.shareIdCondition = new Condition<>();
		return this.shareIdCondition;
	}
	
	/**
	 * 获取分享着参与ID查询条件
	 * 
	 * @return shareIdCondition 分享着参与ID查询条件
	 */
	public Condition<String> getShareIdCondition() {
		return shareIdCondition;
	}

	/**
	 * 设置分享着参与ID查询条件
	 * 
	 * @param shareIdCondition 分享着参与ID查询条件
	 */
	public void setShareIdCondition(Condition<String> shareIdCondition) {
		this.shareIdCondition = shareIdCondition;
	}

	/**
	 * 构造并返回券码查询条件
	 * 
	 * @return ticketCodeCondition 券码查询条件
	 */
	public Condition<String> ticketCode() {
		this.ticketCodeCondition = new Condition<>();
		return this.ticketCodeCondition;
	}
	
	/**
	 * 获取券码查询条件
	 * 
	 * @return ticketCodeCondition 券码查询条件
	 */
	public Condition<String> getTicketCodeCondition() {
		return ticketCodeCondition;
	}

	/**
	 * 设置券码查询条件
	 * 
	 * @param ticketCodeCondition 券码查询条件
	 */
	public void setTicketCodeCondition(Condition<String> ticketCodeCondition) {
		this.ticketCodeCondition = ticketCodeCondition;
	}

	/**
	 * 构造并返回是否中奖 0-未中奖；1-已中奖查询条件
	 * 
	 * @return isPrizeCondition 是否中奖 0-未中奖；1-已中奖查询条件
	 */
	public Condition<Boolean> isPrize() {
		this.isPrizeCondition = new Condition<>();
		return this.isPrizeCondition;
	}
	
	/**
	 * 获取是否中奖 0-未中奖；1-已中奖查询条件
	 * 
	 * @return isPrizeCondition 是否中奖 0-未中奖；1-已中奖查询条件
	 */
	public Condition<Boolean> getIsPrizeCondition() {
		return isPrizeCondition;
	}

	/**
	 * 设置是否中奖 0-未中奖；1-已中奖查询条件
	 * 
	 * @param isPrizeCondition 是否中奖 0-未中奖；1-已中奖查询条件
	 */
	public void setIsPrizeCondition(Condition<Boolean> isPrizeCondition) {
		this.isPrizeCondition = isPrizeCondition;
	}

	/**
	 * 构造并返回[枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件
	 * 
	 * @return getTypeCondition [枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件
	 */
	public Condition<MemberTicketGetType> getType() {
		this.getTypeCondition = new Condition<>();
		return this.getTypeCondition;
	}
	
	/**
	 * 获取[枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件
	 * 
	 * @return getTypeCondition [枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件
	 */
	public Condition<MemberTicketGetType> getGetTypeCondition() {
		return getTypeCondition;
	}

	/**
	 * 设置[枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件
	 * 
	 * @param getTypeCondition [枚举]获取类型：0-会员参加活动获取奖券-PARTICIPATE、1-会员分享活动获取奖券-SHARE查询条件
	 */
	public void setGetTypeCondition(Condition<MemberTicketGetType> getTypeCondition) {
		this.getTypeCondition = getTypeCondition;
	}

	/**
	 * 构造并返回创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> createdBy() {
		this.createdByCondition = new Condition<>();
		return this.createdByCondition;
	}
	
	/**
	 * 获取创建人ID查询条件
	 * 
	 * @return createdByCondition 创建人ID查询条件
	 */
	public Condition<String> getCreatedByCondition() {
		return createdByCondition;
	}

	/**
	 * 设置创建人ID查询条件
	 * 
	 * @param createdByCondition 创建人ID查询条件
	 */
	public void setCreatedByCondition(Condition<String> createdByCondition) {
		this.createdByCondition = createdByCondition;
	}

	/**
	 * 构造并返回创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> createdTime() {
		this.createdTimeCondition = new Condition<>();
		return this.createdTimeCondition;
	}
	
	/**
	 * 获取创建时间查询条件
	 * 
	 * @return createdTimeCondition 创建时间查询条件
	 */
	public Condition<LocalDateTime> getCreatedTimeCondition() {
		return createdTimeCondition;
	}

	/**
	 * 设置创建时间查询条件
	 * 
	 * @param createdTimeCondition 创建时间查询条件
	 */
	public void setCreatedTimeCondition(Condition<LocalDateTime> createdTimeCondition) {
		this.createdTimeCondition = createdTimeCondition;
	}

	/**
	 * 构造并返回更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> modifiedBy() {
		this.modifiedByCondition = new Condition<>();
		return this.modifiedByCondition;
	}
	
	/**
	 * 获取更新人ID查询条件
	 * 
	 * @return modifiedByCondition 更新人ID查询条件
	 */
	public Condition<String> getModifiedByCondition() {
		return modifiedByCondition;
	}

	/**
	 * 设置更新人ID查询条件
	 * 
	 * @param modifiedByCondition 更新人ID查询条件
	 */
	public void setModifiedByCondition(Condition<String> modifiedByCondition) {
		this.modifiedByCondition = modifiedByCondition;
	}

	/**
	 * 构造并返回更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> modifiedTime() {
		this.modifiedTimeCondition = new Condition<>();
		return this.modifiedTimeCondition;
	}
	
	/**
	 * 获取更新时间查询条件
	 * 
	 * @return modifiedTimeCondition 更新时间查询条件
	 */
	public Condition<LocalDateTime> getModifiedTimeCondition() {
		return modifiedTimeCondition;
	}

	/**
	 * 设置更新时间查询条件
	 * 
	 * @param modifiedTimeCondition 更新时间查询条件
	 */
	public void setModifiedTimeCondition(Condition<LocalDateTime> modifiedTimeCondition) {
		this.modifiedTimeCondition = modifiedTimeCondition;
	}

}
